<div id="view_students">Unapproved Accounts:
<?echo form_open('home/processAccounts') ?>
<table id="pending">
    <th>Student No.</th>
    <th>Name</th>
    <th>Options</th>
    <? $i=0;
    if ($data_stud->num_rows() > 0){
        foreach ($data_stud->result() as $row) {?>
        <tr><form>
            <td><center><?=$row->Student_No;?></center></td>
            <td><center><? echo $row->Last_Name.", ".$row->First_Name." ".$row->Middle_Name;?></center></td>
            <td><center> Approved<? $i++;
            $std = $row->Student_No; 
            $a = 'approved'.$i;
            $d = 'disapproved'.$i;

            $data = array(
                'name' => $a,
                'value' => $std,
                'checked' => FALSE
                );
            echo form_checkbox($data);

            ?>
            </td>
            <td><center> Disapproved<? 
            
            $std = $row->Student_No; 

            $data = array(
                'name' => $d,
                'value' => $std,
                'checked' => FALSE
                );
            echo form_checkbox($data);
            
            ?>
            </td>
            <td><center><?  ?> 
        </tr>
    <?}}?>
</table>

<?  echo form_hidden('h',$i);
echo "<br /><br /><br />".form_submit('submit','Submit');
?>
<?echo form_close(); ?>

<?echo form_open('home/processInstructor') ?>
<table id="pending">
    <th>Student No.</th>
    <th>Name</th>
    <th>Options</th>
    <? $j=0;
    if ($data_fact->num_rows() > 0){
        foreach ($data_fact->result() as $row) {?>
        <tr><form>
            <td><center><?=$row->employee_no;?></center></td>
            <td><center><? echo $row->Last_Name.", ".$row->First_Name." ".$row->Middle_Name;?></center></td>
            <td><center> Approved<? $j++;
            $emp = $row->employee_no; 
            $app_string = 'iapproved'.$j;
            $d_string = 'idisapproved'.$j;

            $data = array(
                'name' => $app_string,
                'value' => $emp,
                'checked' => FALSE
                );

            echo form_checkbox($data);

            ?>
            </td>
            <td><center> Disapproved<? 
            
            $std = $row->employee_no; 

            $data = array(
                'name' => $d_string,
                'value' => $emp,
                'checked' => FALSE
                );

            echo form_checkbox($data);
            
            ?>
            </td>
            <td><center><?  ?> 
        </tr>
    <?}}?>
</table>

<?echo form_hidden('num',$j);
echo "<br /><br /><br />".form_submit('submit','Submit');
?>
<?echo form_close(); ?>
</div>